//
//  UIView+IBExtension.swift
//  weibomtz
//
//  Created by 毛铁柱 on 16/10/18.
//  Copyright © 2016年 mtz. All rights reserved.
//

import UIKit

extension UIView {
    @IBInspectable var borderWidth:CGFloat {
        set{
            layer.borderWidth = newValue
        }
        get{
            return layer.borderWidth
        
        }
    
    }
    @IBInspectable var borderColor:UIColor?{
        set{
            layer.borderColor = newValue?.CGColor
        
        
        }
        get{
            if  layer.borderColor != nil {
                return UIColor(CGColor: layer.borderColor!)
            }
            return nil
        
        }
    
    }
    
    @IBInspectable var cornerRadius:CGFloat {
        set{
            layer.cornerRadius = newValue
            layer.masksToBounds = newValue > 0
        }
        get{
            return layer.cornerRadius
        
        }
    
    }

}
